home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-01-12 | 1.2 KB | 35 lines | [TEXT/GEOL] |
- Item 2513264 10-Jan-90 08:51
-
- From: ALGER Alger, Jeff,VCA
-
- To: FRIEDRICH1 Friedrich, Steve
-
- cc: MACAPP.TECH$ MacApp Technical
-
- Sub: Cloning and MacApp
-
- Steve,
-
- I would propose as a general guideline for use of deep cloning in MacApp the
- following:
-
- The default behavior of the Clone method should be to duplicate all 'owned'
- objects and to only duplicate references to 'non-owned' objects. Object A is
- owned by object B if A is normally created by or specifically for the benefit
- of B, and more particularly if A is destroyed when B is destroyed. A non-owned
- object is any object which is not owned (sorry - the mathematician in me coming
- out.)
-
- For example, the next event handler should clearly not be cloned by a
- TEvtHandler, since it is non-owned. Cloning a TDocument, however, probably
- SHOULD duplicate windows, views, and fDocPrintHandler. Finally, TLegBone would
- 'own' TThighBone, but TShinBone would not.
-
- This strategy is obviously subject to refinement in a subclass, but is the most
- generally useful default behavior I can think of.
-
- Regards,
- Jeff Alger
- KPMG Peat Marwick
-
-